﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpenseSystem.Model;
using ExpenseSystem.Lor;
using ExpenseSystem.Common;
using ExpenseSystem.DataUpdater;
using ExpenseSystem.Fether;
using ExpenseSystem.Core.DataAddOn;
using System.Web;

namespace ExpenseSystem.Core.BonusModules
{
    public class SalesBonusBaseManager: SalesBonusManager
    {
        protected UserProfile userProfile = Authority.Authority.GetUserProfile();
        public override bool Delete(SalesBonusModel SalesBonus, out string message)
        {
            SalesBonusFetcher fetcher = new SalesBonusFetcher();
            return updater.Remove(SalesBonus, tran, fetcher, out message);
        }

        public override bool DeleteById( long[] SalesBonus, out string message)
        {

            SalesBonusFetcher fetcher = new SalesBonusFetcher();
            return updater.RemoveById(userProfile.SiteId, SalesBonus, tran, fetcher, out message);
        }

        public override bool Save(SalesBonusModel SalesBonus,  out string message, params IAddable<SalesBonusModel>[] addables)
        {

            SalesBonusFetcher fetcher = new SalesBonusFetcher();
            return updater.Save(SalesBonus, tran, fetcher, out message);
        }
    }
}
